object SetPeriodForm: TSetPeriodForm
  Left = 0
  Top = 0
  BorderStyle = bsDialog
  Caption = #1040#1085#1072#1083#1080#1079' '#1080#1079#1088#1072#1089#1093#1086#1076#1086#1074#1072#1085#1085#1086#1075#1086' '#1084#1077#1090#1072#1083#1083#1086#1087#1088#1086#1082#1072#1090#1072' '#1087#1086' '#1089#1087#1086#1089#1086#1073#1072#1084' '#1088#1072#1089#1082#1088#1086#1103
  ClientHeight = 101
  ClientWidth = 248
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  DesignSize = (
    248
    101)
  PixelsPerInch = 96
  TextHeight = 13
  object StartLabel: TLabel
    Left = 8
    Top = 8
    Width = 55
    Height = 13
    Caption = #1053#1072#1095#1080#1085#1072#1103' '#1089':'
    FocusControl = StartDateTimePicker
  end
  object EndLabel: TLabel
    Left = 127
    Top = 8
    Width = 64
    Height = 13
    Caption = #1047#1072#1082#1072#1085#1095#1080#1074#1072#1103':'
    FocusControl = EndDateTimePicker
  end
  object StartDateTimePicker: TDateTimePicker
    Left = 8
    Top = 27
    Width = 113
    Height = 21
    Date = 42087.645391041670000000
    Time = 42087.645391041670000000
    TabOrder = 0
  end
  object EndDateTimePicker: TDateTimePicker
    Left = 127
    Top = 27
    Width = 113
    Height = 21
    Date = 42087.645391041670000000
    Time = 42087.645391041670000000
    TabOrder = 1
  end
  object PrintBitBtn: TBitBtn
    Left = 8
    Top = 68
    Width = 113
    Height = 25
    Anchors = [akLeft, akBottom]
    Caption = #1060#1086#1088#1084#1080#1088#1086#1074#1072#1090#1100
    Glyph.Data = {
      36040000424D3604000000000000360000002800000010000000100000000100
      2000000000000004000000000000000000000000000000000000FF00FF00FF00
      FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
      FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
      FF00000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF000000
      0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
      C000C0C0C00000000000C0C0C00000000000FF00FF00FF00FF00000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000C0C0C00000000000FF00FF0000000000C0C0
      C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000FFFFFF00FFFFFF00FFFF
      FF00C0C0C000C0C0C000000000000000000000000000FF00FF0000000000C0C0
      C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C0000000FF000000FF000000
      FF00C0C0C000C0C0C00000000000C0C0C00000000000FF00FF00000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000C0C0C000C0C0C0000000000000000000C0C0
      C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
      C000C0C0C00000000000C0C0C00000000000C0C0C00000000000FF00FF000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000C0C0C00000000000C0C0C0000000000000000000FF00FF00FF00
      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
      FF00FFFFFF0000000000C0C0C00000000000C0C0C00000000000FF00FF00FF00
      FF00FF00FF0000000000FFFFFF00FF000000FF000000FF000000FF000000FF00
      0000FFFFFF0000000000000000000000000000000000FF00FF00FF00FF00FF00
      FF00FF00FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
      FF00FFFFFF00FFFFFF0000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00
      FF00FF00FF00FF00FF0000000000FFFFFF00FF000000FF000000FF000000FF00
      0000FF000000FFFFFF0000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00
      FF00FF00FF00FF00FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
      FF00FFFFFF00FFFFFF00FFFFFF0000000000FF00FF00FF00FF00FF00FF00FF00
      FF00FF00FF00FF00FF00FF00FF00000000000000000000000000000000000000
      000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
      FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
      FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
    TabOrder = 2
    OnClick = PrintBitBtnClick
  end
  object CancelBitBtn: TBitBtn
    Left = 127
    Top = 68
    Width = 113
    Height = 25
    Anchors = [akLeft, akBottom]
    Kind = bkCancel
    NumGlyphs = 2
    TabOrder = 3
  end
  object App: TExcelApplication
    AutoConnect = False
    ConnectKind = ckRunningOrNew
    AutoQuit = False
    Left = 16
    Top = 8
  end
  object ADOQuery: TADOQuery
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'date1'
        DataType = ftDateTime
        Value = Null
      end
      item
        Name = 'date2'
        DataType = ftDateTime
        Value = Null
      end>
    SQL.Strings = (
      '  SELECT COUNT (*) kol,'
      '         SUM (KOLT) KOLT,'
      '         SUM (WEIGHT) DetKolt,'
      '         T_REZKA_EQ_S,'
      '         spent,'
      '         priznak'
      
        '    FROM (SELECT CASE SP.CSPPASSPORTS WHEN 0 THEN 1 ELSE 2 END p' +
        'riznak,'
      '                 pas.SPENT,'
      '                 SP.KOLT,'
      '                 SPD.WEIGHT,'
      '                 T_REZKA_EQ_S'
      '            FROM cmknew.passports pas'
      '                 JOIN cmknew.sppassports sp'
      '                    ON pas.nrec = sp.cpassports'
      '                 JOIN cmknew.sppassportsd spd'
      '                    ON SP.NREC = SPD.CSPPASSPORTS'
      '                 LEFT OUTER JOIN CMKNEW.DETAILS det'
      '                    ON SPD.CDETAILS = det.nrec'
      '           WHERE     SP.DATEF BETWEEN :date1 AND :date2'
      '                 AND DET.GRMATERIALS_S LIKE '#39'%'#1051#1080#1089#1090'%'#39')'
      'GROUP BY T_REZKA_EQ_S, SPENT, priznak')
    Left = 56
    Top = 8
  end
end
